package com.buer.dao.util.db;

public class MysqlPageDto {
    /**
     * 原始sql
     */
    private String sql;
    /**
     * select 位置坐标
     */
    private int selectIndex = 0;
    /**
     * from 位置坐标
     */
    private int fromIndex = 0;
    /**
     * 递归标识
     */
    private boolean flag = true;

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
        this.fromIndex = sql.indexOf("FROM");
    }

    public int getSelectIndex() {
        return selectIndex;
    }

    public void setSelectIndex(int selectIndex) {
        this.selectIndex = selectIndex;
    }

    public int getFromIndex() {
        return fromIndex;
    }

    public void setFromIndex(int fromIndex) {
        this.fromIndex = fromIndex;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "MysqlPageDto [sql=" + sql + ", selectIndex=" + selectIndex + ", fromIndex=" + fromIndex + ", flag="
                + flag + "]";
    }

}
